<%@page import="com.amex.uam.util.UAMProp"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page errorPage="JSP_Error.jsp"%>
<%@ page import="com.microstrategy.web.app.utils.JavaScriptBundles"%>
<%@ taglib uri="/webUtilTL.tld" prefix="web"%>
<%@ page import="com.microstrategy.web.app.beans.PageComponent"%>

<%
/* String userTypeCd = request.getParameter("user_type_cd");
if (!"01".equals(userTypeCd)) {
	
	//XXX do something here
	return; 
}*/

%>

<% PageComponent mstrPage = (PageComponent) request.getAttribute("mstrPage");%>
<%@ page contentType="text/html; charset=UTF-8"%>
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Search User</title>
<script type="text/javascript">
window.uam = window.uam || {};
uam.mstrServerInfo = "&Server=<%= UAMProp.getIServerName() %>&Port=<%= UAMProp.getIServerPort() %>";

window.microstrategy = window.microstrategy || {};
microstrategy.sessionState = '<%= mstrPage.getWebIServerSession().getSessionID() %>';

</script>

<web:resource type="custom-javascript" name="jquery.min.js" />
<web:resource type="custom-javascript" name="jquery.validate.js" />
<web:resource type="custom-javascript" name="jquery.form_3.50.js" />
<web:resource type="custom-javascript" name="uam.utils.js" />
<web:resource type="custom-javascript" name="searchUser.js" />

<web:resource type="custom-style" name="main.css" />
<web:resource type="custom-style" name="searchUser.css" />

</head>
<body>
	<div class="searchUser">
		<div>
			<div class="logo">
			</div>
			<div class="linkBar">
			
				<div class="leftLink">
					<a href="mstrWeb?evt=3001&src=mstrWeb.3001" name="ProjectHome" value="Project Home">Home</a>
				</div>
				<div class="leftLink">Trigger MARC Events</div>
				<div class="leftLink"><a href="#" onclick="uam.lsnr.openCreateSharedReportGroupDialog(true); ">Create Shared Folder</a></div>
				
				<div class="rightLink">
					<a href="mstrWeb?evt=3008&src=mstrWeb.3008" type="button" value="Log Out">Logout</a>
				</div>
				<div class="rightLink">My Profile</div>
			</div>
		</div>
	<div class="createSharedReportGroupDialog">
		<div class="title">Create Shared Report</div>
		<div class="content">
			<div>
				<span>Security Group Name: </span><input type="text" name="newScyGrpName">
			</div>
			<div class="message">
			<!-- <span class="errorBox">Error: This group name already exists!</span> -->
			<span class="messageBox">Message: The group has created.</span>
			</div>
		</div>
		<div class="control">
			<button class="okBtn" onclick="uam.lsnr.openCreateSharedReportGroupDialog(false); return false;">Close</button>
			<button class="okBtn" onclick="uam.lsnr.createSharedReportGroup()">Create</button>
		</div>
	</div>
		<div class="logoBar">
			<!-- <img class="logo" src="../plugins/UAM/style/images/Amex_Blue.png"> -->
			<div class="title">

 Users</div>
			<hr class="line"/>
		</div>
		<div class="searchBar">
			<div class="searchType">
				<div><input type="radio" name="searchCriteria" id="searchCriteria_ecId" value="USER_ID" checked="checked" onclick="uam.su.clearInput();"><label for="searchCriteria_ecId" class="fld_lb">Employee/Contractor Id</label></div>
				<div><input type="radio" name="searchCriteria" id="searchCriteria_adsId" value="WORKFORCE_MBR_ID" onclick="uam.su.clearInput();"><label for="searchCriteria_adsId" class="fld_lb">ADS Id</label></div>
				<div><input type="radio" name="searchCriteria" id="searchCriteria_fn" value="USER_1ST_NM"><label for="searchCriteria_fn" onclick="uam.su.clearInput();" class="fld_lb">First Name</label></div>
				<div><input type="radio" name="searchCriteria" id="searchCriteria_ln" value="USER_LST_NM"><label for="searchCriteria_ln" onclick="uam.su.clearInput();" class="fld_lb">Last Name</label></div>
			</div>
			<div class="searchBox">
				<div class="searchText">
					<input class="searchTextBox" id="searchText" type="text" value="8151148" onkeypress="if(event.keyCode==13)uam.su.searchUser();"/>
				</div>
				<div class="s_btn" onclick="uam.su.searchUser();">
					Search<!-- <img src="../plugins/UAM/style/images/search-search.png"> -->
				</div>
			</div>
			<div class="errorBox" id="searchErrorBox"></div>
			<div style="clear:both;"></div>
		</div>
	</div>
	<div id="searchResults" class="searchResults" style="display: none;">
		
		<input type="hidden" name="historyQuery">
		<input type="hidden" name="historyCriteria">
		
		<div id="showResultTip" style="text-align: left;">Show Results Tips</div>
		<div style="text-align: left; font-style: italic;">click on the Employee/Contractor Id to view the User Profile. A <span style='color: green;'>*</span> next to the User Profile indicates an Active Profile.</div>
		<div style="min-height: 250px;">
			<table id="userInfo" border="1" >
				<tr>
					<th>&nbsp;</th>
					<th>Amex Web Id</th>
					<th>Employee/Contractor Id</th>
					<th>Full Name</th>
					<th>Department</th>
					<th>Business Unit</th>
					<th>Cost Center</th>
					<th>Phone#</th>
					<th>E-Mail Address</th>
					<th>Manager</th>
				</tr>
				<!-- <tr>
					<td><input type="checkbox"> <span>*</span></td>
					<td>jsmith10</td>
					<td><a>72937071</a></td>
					<td>John Smith</td>
					<td>GMAR Tech</td>
					<td>-</td>
					<td>255 503 771</td>
					<td>602 123 4567</td>
					<td><a href="#">john.smith@aexp.com</a></td>
					<td>Gene Mason</td>
				</tr> -->
				
			</table>
			
		</div>
		<div style="width: 500px; margin: 0 auto;">
			<div class="button" onclick="uam.lsnr.activateUsers(true)">Activate</div>
			<div class="button" onclick="uam.lsnr.activateUsers(false)">Deactivate</div>
			<div class="button" onclick="uam.lsnr.removeUsers()">Delete</div>
		</div>
	</div>
</body>
</html>	
	



